// let username = sessionStorage.getItem("username");
if (sessionStorage.getItem("username") == null)
    // window.location.href = "/html/login.html";
    window.open("/html/login.html", '_top');

// javascript:window.history.forward(1);

function ajax(url, data, type) {
    data.loginName = sessionStorage.getItem("username");
    let result = {};
    $.ajax({
        url: url,
        data: data,
        dataType: "json",
        async: false,
        type: type,
        success: function (res) {
            result = res;
        }
    })
    return result;
}